	<?php global $cv_option, $cv_comments_switcher, $entry_count;
	
	$show_comments = false;	
	if($cv_comments_switcher == 'off')
		$show_comments = false;
	else if($cv_option['show_comments'] == 'Posts/Pages') 
		$show_comments = true;
	elseif(is_page() && $cv_option['show_comments'] == 'Pages Only')
		$show_comments = true;
	elseif(!is_page() && $cv_option['show_comments'] == 'Posts Only')
		$show_comments = true;		

	?>	
	
    <div class="hentry clearfix <?php if($entry_count==1) echo "first"; ?>">			
		<div class="hentry-left">
			<?php if(!is_page() && !is_single()) { ?>
					<div class="entry-img">
						<?php if ( current_theme_supports( 'get-the-image' ) ) $thumb = get_the_image( array( 'format' => 'array', 'echo' => false, 'custom_key' => array( 'Thumbnail', 'thumbnail' ), 'default_size' => 'entry-image-thumb', 	'default_image' => get_bloginfo ( 'template_url' ) . '/images/'. 'entry-image-thumb.png') );  
						if ( !empty( $thumb['src'] ) ) { ?>
							<a href="<?php echo the_permalink(); ?>"></a><strong></strong><img src="<?php echo $thumb['src']; ?>">	
						<?php } ?>		
					</div><!-- .entry-img -->
			<?php } ?>	
			<div class="right">
				
				<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>	
				<div class="entry-content">
					<?php if(is_page() || is_single()) {				
						the_content('Read More'); 
						wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); 
					}
					else { 
						if(!is_category() && get_post_type() == 'post' ) {							
							
							//Get all terms associated with post in taxonomy 'category'
							$terms = get_the_terms(get_the_ID(),'category');
										
							//Get an array of their IDs
							$term_ids = wp_list_pluck($terms,'term_id');

							//Get array of parents - 0 is not a parent
							$parents = array_filter(wp_list_pluck($terms,'parent'));

							//Get array of IDs of terms which are not parents.
							$term_ids_not_parents = array_diff($term_ids,  $parents);

							//Get corresponding term objects
							$terms_not_parents = array_intersect_key($terms,  $term_ids_not_parents);
							//echo $terms_not_parents; 
							echo '<span class="category">';
							$i = 0;
							foreach($terms_not_parents as $t) {										
								$i++;
							?>
								<a href="<?php echo get_term_link($t->slug, 'category');?>"><?php echo $t->name;?></a>
							<?php 
								if($i==1)
									break;
							}
							echo '</span>';
						}
						print_excerpt(170); 
					
					}?>
			
				</div><!-- .entry-content -->
		
				<?php if(!is_page()) { ?>		
					<span class="entry-meta">						
							<span class="date">
								<?php echo get_the_time('M jS Y');?> 					
							</span>						
							<?php 
							echo apply_atomic_shortcode( 'entry_meta', __( 'by [entry-author]', hybrid_get_textdomain() ) ); ?>
							<span class="comments-link">
								<a class="comments-number" href="<?php echo get_comments_link();?>" ><?php echo get_comments_number();?></a>			
							</span>								
						
					</span>	<!-- .entry-meta -->
				<?php } ?>
			
			</div>
						
		</div>
		
		<?php if(!is_single() && !is_page() && $cv_option['sc_disable_socials'] != true) {?>
			<div class="social-media"><?php echo cv_wpsocialite_markup('small'); ?></div>
		<?php } ?>						
	</div><!-- .hentry -->
	
		
	<?php
	if($show_comments == true) {
		comments_template( '/comments.php', true ); // Loads the comments.php template.
	} ?>
		
	<?php $cv_comments_switcher = 'on'; ?> 